<?php
namespace app\index\controller;

use app\index\validate\IDMustBeInt;
use think\Controller;

class Test extends Controller 
{
    public function test($id){
        $data['id'] = $id;
        $validate = new IDMustBeInt();
        $rest = $validate->check($data);
        if (!$rest) {
            dump($validate->getError());
        }
    }
    
}
